package com.lyj.cloud.business;

import org.springframework.cloud.stream.annotation.StreamListener;
import org.springframework.stereotype.Component;

@Component
public class OrderMessage {

	// 监听 binding 为 OrderProcessor.INPUT_ORDER 的消息
    @StreamListener(com.lyj.cloud.pipe.OrderProcessor.INPUT_ORDER)
    public void inputOrder(Order order) {
        System.out.println("=====订单监听收到=====");
        System.out.println("订单编号：" + order.getOrderNum());
        System.out.println("订单类型：" + order.getType());
        System.out.println("订单数量：" + order.getNum());
        System.out.println("=====订单处理完成=====");
    }
}
